package logic

import (
	"context"
	"furni-set/models/mysql"

	"furni-set/furnirpc/furnirpc"
	"furni-set/furnirpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type HouseShowLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewHouseShowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *HouseShowLogic {
	return &HouseShowLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 家具详情
func (l *HouseShowLogic) HouseShow(in *furnirpc.HouseShowRequest) (*furnirpc.HouseShowResponse, error) {
	// todo: add your logic here and delete this line

	var houseShow []*furnirpc.HouseList

	houseShow = mysql.HouseShow(mysql.DB, houseShow, in.HouseId)

	return &furnirpc.HouseShowResponse{
		List: houseShow,
	}, nil
}
